package com.franklin.maven.localcleaner.ui.tree;

import com.franklin.maven.localcleaner.api.swing.tree.BaseSimpleNode;
import com.intellij.openapi.util.NlsSafe;
import com.intellij.ui.treeStructure.SimpleNode;

/**
 * Maven树顶级节点
 * @author: Ye Junhui
 * @since : 2022/4/2 0002
 */
public class MavenNode extends BaseSimpleNode<MavenJarNode> {
    protected MavenNode(SimpleNode aParent) {
        super(aParent);
    }

    @Override
    protected SimpleNode[] buildChildren() {
        return this.childrenNodeList.toArray(new SimpleNode[this.childrenNodeList.size()]);
    }

    @Override
    public @NlsSafe String getName() {
        return String.format("Maven Local Repository (Found %s Jars)", this.childrenNodeList.size());
    }
}
